from tkinter import *
def hi():
    print("hehe")

win = Tk()
win.title('hello')
win.geometry('400x200')

btn = Button(win,text='OK',command=hi)

#btn.pack(expand=YES,fill=BOTH)

mainloop()